package com.njlime.cms.repository.sys;

import com.njlime.cms.entities.TColumn;
import com.njlime.core.helper.PageBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;
import java.util.Map;


/**
 * @ClassName:     ColumnDao.java
 * @Description:   专业管理
 *  
 * @version        V1.0  
 * @Date           2016-4-3 下午11:23:22 
 */
public interface ColumnDao extends JpaRepository<TColumn, Integer>, JpaSpecificationExecutor<TColumn> {
    public int update(String name, int id, int unitId,int channelShort);

    public TColumn getColumnByName(String name,int unitId,int channelShort);

    public List<Map<String, Object>> getColumnList(int channelShort,int unitId );

    public void delete(String id,int unidId);

    public List<TColumn> getAllColumnList();

    /**
     * 根据栏目id查询栏目
     * @param columns 栏目id，多个栏目逗号隔开
     * @return
     */
    public List listByChannelId(String columns);

    public  List<Map<String,Object>> getColumnListByChannelId(int channelId,int unitId);

    List<Map<String,Object>> getChannelColumnListByChannelId(int channelShort,int unitId);
}
 